package com.huitong.auth.enums;

import cn.hutool.captcha.generator.CodeGenerator;
import cn.hutool.captcha.generator.RandomGenerator;
import com.huitong.auth.captcha.UnsignedMathGenerator;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 验证码生成器类型枚举
 *
 * @author fromdrowning
 * @date 2024/3/20 20:51
 */
@Getter
@AllArgsConstructor
public enum CaptchaType {

    /**
     * 数字生成器
     */
    MATH(UnsignedMathGenerator.class),

    /**
     * 字符生成器
     */
    CHAR(RandomGenerator.class);

    /**
     * 验证码类型生成器对象
     */
    private final Class<? extends CodeGenerator> clazz;

}
